// comcontent/information/information.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    avatarsrc:{
      type:String,
      value:'https://wx.qlogo.cn/mmopen/vi_32/1ZjxdtbJHy7R0UO9djt1lXy5RS0icxDYEGdLWsJlvdz1PDCZJ7dGmmy8XjPiaxEphfKYfON0qgrOG3dO8uictEsQQ/132'
    },
    nickName:{ 
      type:String,
      value:'阿紫'
    },
    sex:{
      type:Boolean,
      value:true
    },
    universty:{
      type:String,
      value:'四川师范大学'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    
   
    sexsrc:'http://icon.tongchengyouzhi.com/image//xingbienan.png',
   
    liansrc:'http://icon.tongchengyouzhi.com/jigouxiangqin/lianxijigou.png',
    txt:'找TA教'
  },

  /**
   * 组件的方法列表
   */
  methods: {
     created:function(e)
     {
      if(this.data.sex){
        this.setData({
          sexsrc:'http://icon.tongchengyouzhi.com/image//xingbienan.png'
        })
      }else{
        this.setData({
          sexsrc: 'http://icon.tongchengyouzhi.com/image//xingbienv.png'
        })
      }
     },
     comulication:function(e){
       
      //  wx.switchTab({
      //    url: '/xiaoxi/xiaoxi/xiaoxi',
      //  })
       this.triggerEvent('comulication',{})
     }
  }
})
